/*
using MyGeneration/Template/NHibernate (c) by Sharp 1.4
based on OHM (alvy77@hotmail.com)
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Model
{

	[Serializable]
	public class Orders
	{
		#region Member Variables

		protected string _id;
		protected string _userid;
		protected string _goodname;
		protected string _goodid;
		protected int? _amount;
        protected DateTime? _createdate;
		protected string _ordercode;
		protected string _expresscompanycostid;
		protected string _expresscompanyid;
		protected string _consigneename;
		protected string _consigneeaddress;
		protected string _consigneephone;
		protected string _consigneeemail;
		protected string _backaddress;
		protected bool _bIsDeleted;
		protected bool _bIsChanged;
		#endregion
		
		
		#region Public Properties
		
		public virtual string Id
		{
			get { return _id; }
			set 
			{
			  if (value != null && value.Length > 36)
			    throw new ArgumentOutOfRangeException("Id", "Id value, cannot contain more than 36 characters");
			  _bIsChanged |= (_id != value); 
			  _id = value; 
			}
			
		}
		
		public virtual string UserId
		{
			get { return _userid; }
			set 
			{
			  if (value != null && value.Length > 36)
			    throw new ArgumentOutOfRangeException("UserId", "UserId value, cannot contain more than 36 characters");
			  _bIsChanged |= (_userid != value); 
			  _userid = value; 
			}
			
		}
		
		public virtual string GoodName
		{
			get { return _goodname; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("GoodName", "GoodName value, cannot contain more than 100 characters");
			  _bIsChanged |= (_goodname != value); 
			  _goodname = value; 
			}
			
		}
		
		public virtual string GoodId
		{
			get { return _goodid; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("GoodId", "GoodId value, cannot contain more than 100 characters");
			  _bIsChanged |= (_goodid != value); 
			  _goodid = value; 
			}
			
		}
		
		public virtual int? Amount
		{
			get { return _amount; }
			set { _bIsChanged |= (_amount != value); _amount = value; }
			
		}

        public virtual DateTime? CreateDate
		{
			get { return _createdate; }
			set { _bIsChanged |= (_createdate != value); _createdate = value; }
			
		}
		
		public virtual string OrderCode
		{
			get { return _ordercode; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("OrderCode", "OrderCode value, cannot contain more than 50 characters");
			  _bIsChanged |= (_ordercode != value); 
			  _ordercode = value; 
			}
			
		}
		
		public virtual string ExpressCompanyCostId
		{
			get { return _expresscompanycostid; }
			set 
			{
			  if (value != null && value.Length > 36)
			    throw new ArgumentOutOfRangeException("ExpressCompanyCostId", "ExpressCompanyCostId value, cannot contain more than 36 characters");
			  _bIsChanged |= (_expresscompanycostid != value); 
			  _expresscompanycostid = value; 
			}
			
		}
		
		public virtual string ExpressCompanyId
		{
			get { return _expresscompanyid; }
			set 
			{
			  if (value != null && value.Length > 36)
			    throw new ArgumentOutOfRangeException("ExpressCompanyId", "ExpressCompanyId value, cannot contain more than 36 characters");
			  _bIsChanged |= (_expresscompanyid != value); 
			  _expresscompanyid = value; 
			}
			
		}
		
		public virtual string ConsigneeName
		{
			get { return _consigneename; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("ConsigneeName", "ConsigneeName value, cannot contain more than 50 characters");
			  _bIsChanged |= (_consigneename != value); 
			  _consigneename = value; 
			}
			
		}
		
		public virtual string ConsigneeAddress
		{
			get { return _consigneeaddress; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("ConsigneeAddress", "ConsigneeAddress value, cannot contain more than 100 characters");
			  _bIsChanged |= (_consigneeaddress != value); 
			  _consigneeaddress = value; 
			}
			
		}
		
		public virtual string ConsigneePhone
		{
			get { return _consigneephone; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("ConsigneePhone", "ConsigneePhone value, cannot contain more than 50 characters");
			  _bIsChanged |= (_consigneephone != value); 
			  _consigneephone = value; 
			}
			
		}
		
		public virtual string ConsigneeEmail
		{
			get { return _consigneeemail; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("ConsigneeEmail", "ConsigneeEmail value, cannot contain more than 50 characters");
			  _bIsChanged |= (_consigneeemail != value); 
			  _consigneeemail = value; 
			}
			
		}
		
		public virtual string BackAddress
		{
			get { return _backaddress; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("BackAddress", "BackAddress value, cannot contain more than 100 characters");
			  _bIsChanged |= (_backaddress != value); 
			  _backaddress = value; 
			}
			
		}
		

		public virtual bool IsDeleted
		{
			get
			{
				return _bIsDeleted;
			}
			set
			{
				_bIsDeleted = value;
			}
		}

        public virtual bool IsChanged
		{
			get
			{
				return _bIsChanged;
			}
			set
			{
				_bIsChanged = value;
			}
		}
		
		#endregion 
		
	}
	
}
